/*******************************************************************************
 * @project: aohuaproject
 * @package: com.aohu.excel
 * @file: IExcelService.java
 * @author: fionn
 * @created: 2015年5月5日
 * @purpose:
 * 
 * @version: 1.0
 * 
 * 
 * Copyright 2015 HAND All rights reserved.
 ******************************************************************************/
package com.aohua.excel;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;

import org.apache.poi.ss.usermodel.Sheet;

/**
 * @author fionn
 *
 */
public interface IExcelService<T> {

    public void open(File excelFile) throws FileNotFoundException, IOException;
    
    public void open4Write(File excelFile) throws FileNotFoundException;
    
    public void save();
    
    public void close();
    
    public Sheet[] getSheets();
    
    public Sheet createSheet(String sheetName);
    
    public List<T> read(Sheet sheet);
    
    public void write(Sheet sheet, T data);
    
    public void write(Sheet sheet, List<T> datas);
    
    
}
